﻿/*
	Copyright (C) 2019 Zongming Liu <1849059316@qq.com>

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef ApplicationViewInterface_h__
#define ApplicationViewInterface_h__

#include <memory>
#include <functional>
#include <windows.h>
#include <vector>
#include "../utility/MacroTool.h"
#include "../base/Size.h"

namespace SkyEngine2d
{
	
	/*!
	 \brief  应用程序视图接口
	 \details
	*/
	class SGE_API IApplicationView
	{
	public:
		virtual ~IApplicationView() {}
	
		//! 设置窗口的标题
		/*!
		\param const std::wstring & caption 窗口的标题
		\return void  
		*/
		virtual void setCaption(const std::wstring & caption = L"") = 0;
		
		//! 获取窗口的标题 
		/*!
		\return const std::wstring & 
		*/
		virtual const std::wstring & getCaption() = 0;
	
		//! 获取窗口的句柄
		/*!
		\return HWND  
		*/
		virtual HWND getHwnd() = 0;
	
	
		//! 获取视图的尺寸
		/*!
		\return const Size &  
		*/
		virtual const Size & getViewSize() = 0;
	
		//! 获取窗口的尺寸
		/*!
		\return const Size &  
		*/
		virtual const Size & getWinSize() = 0;
	
		//! 设置窗口的位置
		/*!
		\param const Vector2 & pos 窗口左上角的坐标点 （像素）
		\return void  
		\note 坐标点 是在桌面坐标系中 ，原点在 左上角   
		*/
		virtual void setWinPosition(const Vector2 & pos) = 0;
	
		//! 获取窗口左上角位置的坐标 （单位：像素）
		/*!
		\return const Vector2 &  
		*/
		virtual const Vector2 & getWinPosition() = 0;
	
		//! 获取桌面的尺寸
		/*!
		\return const Size &  
		*/
		virtual const Size & getDesktopSize() = 0;
	};
	
}

#endif // ApplicationViewInterface_h__
